//
//  UserInfo.h
//  KidReading
//
//  Created by telen on 16/3/23.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import <Foundation/Foundation.h>

#pragma mark- UserInfo
@class TABLE_BOOKS;
@class BaseViewController;
@interface UserInfo : NSObject
//一账通映射
@property(nonatomic,readonly)NSString* userName;
@property(nonatomic,readonly)NSInteger uid;
@property(nonatomic,readonly)NSString* uCode;
@property(nonatomic,readonly)NSString* catoken;
@property(nonatomic,readonly)NSString* country_code;
@property(nonatomic,readonly)NSInteger role; //(1家长；2孩子；3教师)
@property(nonatomic,readonly)BOOL isGuest;
@property(nonatomic,readonly)NSInteger gender; //(0:男 1:女)
//Login获得与刷新
@property(nonatomic,strong)NSString* token;
//authorInfo 获得
@property(nonatomic,assign)NSInteger s_flag; //0 普通用户，1 特殊用户
@property(nonatomic,strong)NSDictionary* selfVip; //自己的vip信息
@property(nonatomic,strong)NSDictionary* schoolVip; //学校的vip信息
@property(nonatomic,strong)NSDictionary* familyVip; //家庭的vip信息
@property(nonatomic,strong)NSDictionary* show; //呈现的文字(包含vip相关呈现文字)
@property(nonatomic,strong)NSString* boughtBookIds;//已经购买Bookid清单
//
@property(nonatomic,strong)NSDictionary *totalSub;//订阅按钮信息
@property(nonatomic,assign)NSInteger reviewCount;   //订单审核未阅读数量

//titlebar信息
@property(nonatomic,strong)NSArray* titleBar;

//是否游客，综合设备锁用户
- (BOOL)isGuest_exp_device;

//用户是否有VIP 信息
- (BOOL)isAnySelfVipEnable;
- (BOOL)isAnyKindsVipEnable;
- (BOOL)isVipEnable:(NSString*)viptype;
- (BOOL)isInfo_OK;

//VIP code 获得对应的 VIP 中英文描述
- (NSString*)vipPayInfoShow:(NSArray*)vipCodeArr;
- (NSString*)vipPayItemShow:(NSString*)vipCode;

//VIP 设置中
- (NSArray*)vipSetInfoShow;

//Vip 书架名后显示
- (NSString*)vipGridInfoShow:(NSString*)vipCode;


//已购判断
- (BOOL)isBoughtBookId:(NSInteger)bookid;

//iOS PUSH Token 管理
- (void)savePush_deviceToken:(NSString*)deviceToken;
- (NSString*) loadPush_deviceToken;

//
- (void)logout;
//
- (BOOL)authorityForbook:(TABLE_BOOKS *)tb_book currentVC:(BaseViewController*)currentVC;

@end
